package com.example.db.audit;

import org.springframework.data.domain.AuditorAware;

import java.util.Optional;

/**
 *  硬编码，
 *  也可以通过查询数据库，SpringSecurity等获取
 * @author L.xf
 * @date 2021/10/28
 */
public class AuditorAwareImpl implements AuditorAware<Long> {
    @Override
    public Optional<Long> getCurrentAuditor() {
        return Optional.of(654321L);
    }
}
